<?php
/**
 *
 * Project:     Neuf TV MediaCenter - MP9CTL
 * File:        index.php
 *
 * Page principale de reception des requetes
 *
 * @author David G. pour Neuf Cegetel
 *
 */

/* Parametres d'execution */
ini_set('display_errors', 'On');

/* Fonctions communes */
require_once('common.inc.php');

/* Detection type requete */
$cmd = '';
if (isset($_POST['cmd'])) $cmd = $_POST['cmd'];
else if (isset($_GET['cmd'])) $cmd = $_GET['cmd'];

switch ($cmd) {
	case "toplist":
		require_once('toplist.inc.php');
		break;

	case "browse":
		require_once('browse.inc.php');
		break;
		
	case "savePlaylist":
		require_once('playlist.inc.php');
		break;

	case "play":
	case "stop":
	case "pause":
	case "previous":
	case "next":
	case "seek":
	case "getPosition":
	case "getInfos":
		/* Commandes pour pilotage streamer externe */
		require_once('streamer.inc.php');
		break;
		
	default:
		require_once('status.inc.php');
		break;
}
?>
